package com.ynet.eq.haiqing.module.datatran.controller;

import com.ynet.eq.haiqing.module.datatran.req.AddOrUpdateUserReq;
import com.ynet.eq.haiqing.module.datatran.service.DataTranService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @author 胡超雄
 * @date 2021/6/25 13:54
 * @desc 接口 4 数据传输相关接口
 */
@RestController("/data_tran")
@Validated
public class DataTranController {

    @Resource
    private DataTranService dataTranService;

    /**
     * 添加或者修改
     *
     * @param
     * @return
     */
    @PostMapping("/add_or_update_user")
    public void addOrUpdateUser(@Valid @RequestBody AddOrUpdateUserReq req) {
        dataTranService.addOrUpdateUser(req);
    }


//    @PostMapping("/bind_pro")
//    public void bindPro(@Valid @RequestBody BindBuildProVo bindBuildProVo) {
//        buildingService.bindPro(bindBuildProVo);
//    }

}
